#include <cmdDealCommon.h>
#include <cmdSetReadSN.h>
#include <cmdReadBaseInform.h>

#define PTC_DO_CMD_CASE_DEF(name)                                  \
    case ptcCmdFuncEnumDef(name):                             \
    {                                                              \
        masterCmdCvrtFuncName(name)(ptcCmdGetUsrPtr(cmdOpt)); \
        tmpflag = devCmdDealFuncName(name)(cmdOpt);           \
        devCmdCvrtFuncName(name)(ptcCmdGetUsrPtr(cmdOpt));    \
        break;                                                     \
    }
int ptcDoCommandFunction(struct ptcCmdOptStruct *cmdOpt)
{
    int tmpflag = -1;
    switch (ptcCmdGetCmdNB(cmdOpt))
    {
    PTC_DO_CMD_CASE_DEF(SetReadSN);
    PTC_DO_CMD_CASE_DEF(ReadBaseInfo);
    default:
    {
        break;
    }
    }
    return tmpflag;
}